package com.siblings.loan.utils.dialog

import android.content.Context
import android.view.Gravity
import android.view.WindowManager
import com.lib.base.utils.DensityUtils
import com.lib.base.utils.dialog.BaseDialog
import com.siblings.loan.R
import com.siblings.loan.app.Apps

abstract class ProDialog(context: Context?): BaseDialog(context) {

    override fun initWindow() {
        val params = window!!.attributes
        params.width = Apps.app.getPhoneWidth() - DensityUtils.dp2px(32f)
        params.height = WindowManager.LayoutParams.WRAP_CONTENT
        window!!.attributes = params
        window!!.setWindowAnimations(R.style.dialog_scale_anim) //修改动画样式
        window!!.setGravity(Gravity.CENTER)
    }
}